/*
 * ModelControlLinker.h
 *
 * Facade class that communication between Model and Controllers
 */

#ifndef MODELCONTROLLINKER_H_
#define MODELCONTROLLINKER_H_
#include "Board.h"
#include "FileManager.h"

enum Action{NO_PIECE_SELECTED,PIECE_SELECTED,PIECE_MOVED};	//Enumeration for potential actions from a click event

class ModelControlLinker{
private:
	Board board;				//Chess board
	Piece *selected;			//Selected Piece
	Action currentAction;		//Keeps track of last event
	FileManager fileManager;	//Support class for saving and loading games
public:
	ModelControlLinker();			//Constructor
	~ModelControlLinker();			//Deconstructor
	void loadGame(char *fileName);	//Loads a given file
	void saveGame(char *fileName);	//Saves game to a given file
	void newGame();					//Restarts game
	Action click(Position click);	//Regesters a click on board, returns result action
	bool Undo();					//Undoes previous trun
	vector<Position> getHighlighted();	//Returns a list of positions that should be hilighted
	Board* getBoard();				//Returns a pointer to the board

};

#endif /* MODELCONTROLLINKER_H_ */
